ember-cli-deploy-plugin
This NPM module exposes a base class that can be used by ember-cli-deploy plugins to streamline
implementation of a plugin.
Usage
In your plugin's directory:
npm install ember-cli-deploy-plugin --save
In your plugin's index.js
file:
'use strict';
var DeployPluginBase = require('ember-cli-deploy-plugin');
module.exports = {
name: 'ember-cli-deploy-awesomeness',
createDeployPlugin: function(options) {
var DeployPlugin = DeployPluginBase.extend({
name: options.name,
defaultConfig: {
someKey: 'defaultValue',
anotherKey: function(context) {
return context.anotherKey;
}
},
requiredConfig: ['awesomeApiKey'],
willUpload: function(context) {
var someValue = this.readConfig('someKey');
var anotherValue = this.readConfig('anotherKey');
var awesomeApiKey = this.readConfig('awesomeApiKey');
this.log('output some awesomeness');
this.log('output some red awesomeness', { color: 'red' });
this.log('output this only when verbose option is enabled', { verbose: true });
return Promise.resolve();
},
});
return new DeployPlugin();
}
};
## TODO
Tests